//package com.ChessGame.gameRules;
package com.si.entite;
public class Player {
	

	String name;
        boolean play;
        String side;

    public String getSide() {
        return side;
    }

    public void setSide(String side) {
        this.side = side;
    }
	
	public Player(String n, String s, boolean play)
	{
		this.name = n;
                this.side = s;
                this.play = play;
                

	}
	
        public Player(String n, String s)
	{
		this(n,s, true);
	}
        
        public void setPlay(boolean play) {
            this.play = play;
        }
        
        public boolean isPlay() {
            return play;
        }
        
        public boolean jouer(Partie p)
	{
		p = new Partie();
		return true;
	}
	
        public String getName() {
		return name;
	}
	
        public void setName(String name) {
		this.name = name;
	}
        

        public boolean equals(Object x)
        { if (x instanceof Player)
            {
                Player xy = (Player) x;
                if (xy.getName().equals(this.getName()))
                {
                    return true;
                }
            }else { return false;}
        return false;
        }

}
